home *** CD-ROM | disk | FTP | other *** search
/ Power DOS 1996 July / Power DOS - July 1996.iso / sound / c_labs / sb16 / upg303.exe / UPGRADE.BAT < prev   
DOS Batch File  |  1994-09-01  |  5KB  |  112 lines

  1. cls
  2. @if "%1"=="" goto need_directory 
  3. @echo *********************************************************************
  4. @echo *                                                                   *
  5. @echo *                 EZ-SCSI 3.03 - Upgrade Program                    *
  6. @echo *                 ------------------------------                    *
  7. @echo *                                                                   *
  8. @echo *      Welcome to the EZ-SCSI 3.03 Upgrade Program.  In order       *
  9. @echo *      for this upgrade program to run successfully you need to     *
  10. @echo *      have a previous version of EZ-SCSI already installed on      *
  11. @echo *      your system.                                                 *
  12. @echo *                                                                   *
  13. @echo *                                                                   *
  14. @echo *      This program will create the directory \OLDSYS where         *
  15. @echo *      the older version of your software will be stored.           * 
  16. @echo *      Consult the README.TXT file for further information          *
  17. @echo *      on this upgrade program.                                     *
  18. @echo *                                                                   *
  19. @echo *********************************************************************
  20. @rem pause
  21. @rem
  22. @rem ----------------------------------------------------------------------
  23. @rem Note: %1 = user's path for where ezscsi is installed on their drive.
  24. @rem       We redirect the output of the upgrade procedure to the file
  25. @rem       UPINFO.TXT.  
  26. @rem       Currently this file contains nothing more than the header for
  27. @rem       the RTPatch program,  but we can allow it to contain all of the
  28. @rem       information regarding the upgrade procedure by rebuilding the
  29. @rem       patch with NOMESSAGE and QUITE eliminated from the configuration
  30. @rem       set.
  31. @rem -----------------------------------------------------------------------
  32. @echo Performing upgrade...please wait
  33. @echo (This process can take up to 5 minutes depending on your system.)
  34. @echo ...working...
  35. @echo.
  36. @echo.
  37. @rem
  38. @rem
  39. @rem -----------------------------------------------------------------------
  40. @rem   PATCH.EXE and PATCH.RTP, the two files necessary to carry out the
  41. @rem   patch program are renamed to reduce confusion for customer to *.inc.
  42. @rem   Here is where we rename them back to their executable extensions to
  43. @rem   allow the patch to operate.  We rename them back to *.inc at the end
  44. @rem   of this program.
  45. @rem -----------------------------------------------------------------------
  46. @rename patch1.inc patch.exe
  47. @rename patch2.inc patch.rtp
  48. @patch %1 > UPINFO.TXT
  49. @if ERRORLEVEL 1 goto failed_upgrade
  50. @rem -----------------------------------------------------------------------
  51. @rem Here we copy the upgrade readme file to the user's EZ-SCSI directory.
  52. @rem -----------------------------------------------------------------------
  53. @del UPINFO.TXT
  54. @echo Upgrade Complete!
  55. @echo.
  56. @echo.
  57. @echo Copying README.TXT to %1 ...
  58. @copy readme.txt %1
  59. @echo.
  60. @echo.
  61. @if ERRORLEVEL 1 goto failed_readme_copy
  62. @goto end
  63.  
  64. :need_directory
  65. @cls
  66. @echo **********************************************************************
  67. @echo *                                                                    *
  68. @echo *        You need to type the directory of your current EZ-SCSI      *
  69. @echo *        installation after UPGRADE as follows:                      *
  70. @echo *                                                                    *
  71. @echo *                      UPGRADE C:\SCSI                               *
  72. @echo *                                                                    *
  73. @echo **********************************************************************
  74. @pause
  75. @goto failed
  76.  
  77. :failed_upgrade
  78. cls
  79. @echo Upgrade failed!
  80. @rem --------------------------------------------------------------------
  81. @rem Renaming patch files back to non-executable extensions
  82. @rem --------------------------------------------------------------------
  83. @rename patch.exe patch1.inc
  84. @rename patch.rtp patch2.inc
  85. @pause
  86. @goto failed
  87.  
  88. :failed_readme_copy
  89. @cls
  90. @echo Upgrade was successful!
  91. @echo Unable to copy README.TXT to %1
  92. @rem --------------------------------------------------------------------
  93. @rem Renaming patch files back to non-executable extensions
  94. @rem --------------------------------------------------------------------
  95. @rename patch.exe patch1.inc
  96. @rename patch.rtp patch2.inc
  97. @goto failed
  98.  
  99. :end
  100. @rem --------------------------------------------------------------------
  101. @rem Renaming patch files back to non-executable extensions
  102. @rem --------------------------------------------------------------------
  103. @rename patch.exe patch1.inc
  104. @rename patch.rtp patch2.inc
  105. @echo Upgrade program completed.
  106. @echo.
  107. @pause
  108. cls
  109.  
  110. :failed
  111.  
  112.